<%@page import="org.apache.struts2.components.Include"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
    <%@ include file="/WEB-INF/jsp/public/commons.jspf" %>
<html>
<head>
	<title>查看记录</title>

	<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/style/blue/forum.css" />
	
	<script language="javascript" src="${pageContext.request.contextPath}/script/fckeditor/fckeditor.js" charset="utf-8"></script>
    <script type="text/javascript">
		$(function(){
			var fck = new FCKeditor("content");
			fck.Width = "90%";
			fck.ToolbarSet = "bbs";
			fck.BasePath = "${pageContext.request.contextPath}/script/fckeditor/";
			fck.ReplaceTextarea();
		});
    </script>
</head>
<body>

<!-- 标题显示 -->
<div id="Title_bar">
    <div id="Title_bar_Head">
        <div id="Title_Head"></div>
        <div id="Title"><!--页面标题-->
            <img border="0" width="13" height="13" src="${pageContext.request.contextPath}/style/images/title_arrow.gif"/> 查看记录
        </div>
        <div id="Title_End"></div>
    </div>
</div>

<!--内容显示-->	
<div id="MainArea">
	<div id="PageHead"></div>
	<center>
		<div class="ItemBlock_Title1" style="width: 98%">
			<font class="MenuPoint"> &gt; </font>
			<s:a action="service_list">服务记录</s:a>
			<font class="MenuPoint"> &gt; </font>
			<s:a action="service_show?id=%{#serviceTopic.service.id}">${serviceTopic.service.name }</s:a>
			<font class="MenuPoint"> &gt;&gt; </font>
			记录查看
			<span style="margin-left:30px;">
			<s:a action="serviceTopic_addUI?serviceId=%{#serviceTopic.service.id}">
				<img align="absmiddle" src="${pageContext.request.contextPath}/style/blue/images/button/publishNewTopic.png"/>
			</s:a>
			</span>
		</div>
		
		<div class="ForumPageTableBorder dataContainer" datakey="replyList">
		
			<!--显示主题标题等-->
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr valign="bottom">
				<td width="3" class="ForumPageTableTitleLeft">&nbsp;</td>
					<td class="ForumPageTableTitle"><b>标题：${serviceTopic.title }</b></td>
					<s:if test="#serviceTopic.recorder.name==#session.user.name">
					<td class="ForumPageTableTitle" align="right" style="padding-right:12px;">
     						<s:a cssClass="detail" action="materialConsume_addUI?serviceTopicId=%{#serviceTopic.id}">
							<img border="0" src="${pageContext.request.contextPath}/style/images/reply.gif" />添加耗材信息
						</s:a> 
			<%-- 			<a href="moveUI.html"><img border="0" src="${pageContext.request.contextPath}/style/images/edit.gif" />移动到其他版块</a>
						<a href="#" onClick="return confirm('要把本主题设为精华吗？')"><img border="0" src="${pageContext.request.contextPath}/style/images/topicType_1.gif" />精华</a>
						<a href="#" onClick="return confirm('要把本主题设为置顶吗？')"><img border="0" src="${pageContext.request.contextPath}/style/images/topicType_2.gif" />置顶</a>
						<a href="#" onClick="return confirm('要把本主题设为普通吗？')"><img border="0" src="${pageContext.request.contextPath}/style/images/topicType_0.gif" />普通</a> --%>
					</td></s:if>
					<td width="3" class="ForumPageTableTitleRight">&nbsp;</td>
				</tr>
				<tr height="1" class="ForumPageTableTitleLine"><td colspan="4"></td></tr>
			</table>

			<!-- ~~~~~~~~~~~~~~~ 显示主文章 ~~~~~~~~~~~~~~~ -->
<%-- 			<s:if test="currentPage==1">
 --%>			<div class="ListArea">
				<table border="0" cellpadding="0" cellspacing="1" width="100%">
					<tr>
						<td rowspan="3" width="130" class="PhotoArea" align="center" valign="top">
							<!--作者头像-->
							<div class="AuthorPhoto">
								<img border="0" width="110" height="110" src="${pageContext.request.contextPath}/style/images/defaultAvatar.gif" 
									onerror="this.onerror=null; this.src='${pageContext.request.contextPath}/style/images/defaultAvatar.gif';" />
							</div>
							<!--作者名称-->
							<div class="AuthorName">${serviceTopic.recorder.name}</div>
						</td>
						<td align="center">
							<ul class="TopicFunc">
								<!--操作列表-->
								<s:if test="#serviceTopic.recorder.name==#session.user.name">
								<li class="TopicFuncLi">
									<a class="detail" href="${pageContext.request.contextPath}/BBS_Topic/saveUI.html"><img border="0" src="${pageContext.request.contextPath}/style/images/edit.gif" />编辑</a>
									<s:a cssClass="detail" action="serviceTopic_delete?serviceTopicId=%{id}" onClick="return confirm('确定要删除本次记录吗？')"><img border="0" src="${pageContext.request.contextPath}/style/images/delete.gif" />删除</s:a>								</li></s:if>
								<!-- 文章表情与标题 -->
	<%-- 							<li class="TopicSubject">
									<img width="19" height="19" src="${pageContext.request.contextPath}/style/images/face/face1.gif"/>
									新手发帖
								</li> --%>
							</ul>
						</td>
					</tr>
					<tr><!-- 文章内容 -->
						<td valign="top" align="center">
							<div class="Content1">
							用户姓名:${serviceTopic.user.name}</br></br>
							用户性别:${serviceTopic.user.gender}</br></br>
							所属部门:${serviceTopic.user.department.name}</br></br>
							联系电话:${serviceTopic.user.phoneNumber}</br></br>
							电子邮件:${serviceTopic.user.email}</br></br>
							服务过程:${serviceTopic.serviceProcess}</br></br>
							消耗零件:
							
 <table cellspacing="0" cellpadding="0" class="TableStyle">
       
        <!-- 表头-->
        <thead>
            <tr align=center valign=middle id=TableTitle>
            	<td width="150px">物料编号</td>
				<td width="150px">物料名称</td> 
				<td width="200px">规格型号</td>
				<td width="300px">使用数量</td>
				<td  width="300px">设置数量</td>
		     <td  width="300px">删除</td>
				
            </tr>
        </thead>

		<!--显示数据列表-->
		<s:iterator value="#materialConsumeList" status="i">
        <tbody id="TableData" class="dataContainer" datakey="materialList">
			<tr class="TableDetail1 template">
				<td>${material.serialNumber}&nbsp;</td>
				<td>${material.name}&nbsp;</td>
				<td>${material.specification}&nbsp;</td>
				<td>使用;${num}${material.unit}&nbsp;</td>
				<td><s:a action="materialConsume_editUI?id=%{id}&serviceTopicId=%{serviceTopic.id}">设置领用数</s:a></td>
<td><s:a action="materialConsume_delete?id=%{id}&serviceTopicId=%{serviceTopic.id}" onClick="return confirm('您确定要删除吗？')" >删除</s:a></td>
			</tr>
        </tbody>
        </s:iterator>
    </table>	</div>
			<!--  结束！！！！！！-->				
			</br>
<%-- 		<s:iterator value="#materialConsumeList" status="i"> 
			    	 <s:property value="#i.index+1"/>&nbsp;&nbsp;
			    	${material.serialNumber}&nbsp;|
			        ${material.name}&nbsp;|
			     	${material.specification}&nbsp;&nbsp;|
			     	使用;${num}${material.unit}&nbsp;&nbsp;|
			     	<s:a action="materialConsume_editUI?id=%{id}&serviceTopicId=%{serviceTopic.id}">设置数量</s:a>
			     	</br>
			     	
        </s:iterator> --%>
							
							</br>
									<!-- 循环耗材信息 -->
<%-- 		<s:iterator value="#materialConsumeList">
			<tr class="TableDetail1 template">
				<td>${material.serialNumber}&nbsp;</td>
				<td>${material.name}&nbsp;</td>
				<td>${material.specification}&nbsp;</td>

				<td>
				</td>
			</tr>
        </s:iterator> --%>

        <!-- 循环结束 -->
					</tr>
					<tr><!--显示楼层等信息-->
						<td class="Footer" height="28" align="center" valign="bottom">
							<ul style="margin: 0px; width: 98%;">
								<li style="float: left; line-height:18px;"><font color=#C30000>[发布时间]</font>
									${serviceTopic.postTime}		
								</li>
								<li style="float: right;"><a href="javascript:scroll(0,0)">
									<img border="0" src="${pageContext.request.contextPath}/style/images/top.gif" /></a>
								</li>
							</ul>
						</td>
					</tr>
				</table>
			</div>
<%-- 			</s:if>
 --%>			<!-- ~~~~~~~~~~~~~~~ 显示主文结束 ~~~~~~~~~~~~~~~ -->


			<!-- ~~~~~~~~~~~~~~~ 显示回复列表 ~~~~~~~~~~~~~~~ -->
<%-- 			<s:iterator value="recordList" status="status">
			<div class="ListArea template">
				<table border="0" cellpadding="0" cellspacing="1" width="100%">
					<tr>
						<td rowspan="3" width="130" class="PhotoArea" align="center" valign="top">
							<!--作者头像-->
							<div class="AuthorPhoto">
								<img border="0" width="110" height="110" src="${pageContext.request.contextPath}/style/images/defaultAvatar.gif" 
									onerror="this.onerror=null; this.src='${pageContext.request.contextPath}/style/images/defaultAvatar.gif';" />
							</div>
							<!--作者名称-->
							<div class="AuthorName">${author.name}</div>
						</td>
						<td align="center">
							<ul class="TopicFunc">
								<!--操作列表-->
								<li class="TopicFuncLi">
									<a class="detail" href="${pageContext.request.contextPath}/BBS_Topic/saveUI.html"><img border="0" src="${pageContext.request.contextPath}/style/images/edit.gif" />编辑</a>
									<a class="detail" href="#" onClick="return confirm('确定要删除本帖吗？')"><img border="0" src="${pageContext.request.contextPath}/style/images/delete.gif" />删除</a>
								</li>
								<!-- 文章表情与标题 -->
								<li class="TopicSubject">
									<img width="19" height="19" src="${pageContext.request.contextPath}/style/images/face/${reply.faceIcon}"/>
									${title}
								</li>
							</ul>
						</td>
					</tr>
					<tr><!-- 文章内容 -->
						<td valign="top" align="center">
							<div class="Content">${content}</div>
						</td>
					</tr>
					<tr><!--显示楼层等信息-->
						<td class="Footer" height="28" align="center" valign="bottom">
							<ul style="margin: 0px; width: 98%;">
								<li style="float: left; line-height:18px;"><font color=#C30000>[${(currentPage-1)*pageSize+status.count}楼]</font>
									${postTime }
								</li>
								<li style="float: right;"><a href="javascript:scroll(0,0)">
									<img border="0" src="${pageContext.request.contextPath}/style/images/top.gif" /></a>
								</li>
							</ul>
						</td>
					</tr>
				</table>
			</div>
			</s:iterator> --%>
			<!-- ~~~~~~~~~~~~~~~ 显示回复列表结束 ~~~~~~~~~~~~~~~ -->
		</div>

		<!--分页信息-->
<%-- 	<%@ include file="/WEB-INF/jsp/public/pageView.jspf" %>
 --%><!-- 		<script type="text/javascript">
			function gotoPage(pageNum){
				window.location.href="topic_show.action?id=${id}&pageNum="+pageNum;
				
			}
		
		</script> -->
<%-- 			<s:form action="serviceTopic_show?id=%{id}"></s:form> 
 --%>		<div class="ForumPageTableBorder" style="margin-top: 25px;">
<!-- 			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr valign="bottom">
					<td width="3" class="ForumPageTableTitleLeft">&nbsp;</td>
					<td class="ForumPageTableTitle"><b>快速回复</b></td>
					<td width="3" class="ForumPageTableTitleRight">&nbsp;</td>
				</tr>
				<tr height="1" class="ForumPageTableTitleLine">
					<td colspan="3"></td>
				</tr>
			</table>
		</div> -->
	</center>
			
	<!--快速回复-->
		<%-- <div class="QuictReply">
	<form action="">
		<div style="padding-left: 3px;">
			<table border="0" cellspacing="1" width="98%" cellpadding="5" class="TableStyle">
				<tr height="30" class="Tint">
					<td width="50px" class="Deep"><b>标题</b></td>
					<td class="no_color_bg">
						<input type="text" name="title" class="InputStyle" value="回复：昨天发现在表单里删除的图片" style="width:90%"/>
					</td>
				</tr>
				<tr class="Tint" height="200">
					<td valign="top" rowspan="2" class="Deep"><b>内容</b></td>
					<td valign="top" class="no_color_bg">
						<textarea name="content" style="width: 95%; height: 300px"></textarea>
					</td>
				</tr>
				<tr height="30" class="Tint">
					<td class="no_color_bg" colspan="2" align="center">
						<input type="image" src="${pageContext.request.contextPath}/style/blue/images/button/submit.PNG" style="margin-right:15px;"/>
					</td>
				</tr>
			</table>
		</div>
	</form>
	</div> --%>
</div>



</body>
</html>
